#include "Dialogs/rotationdialog.h"
#include "ui_rotationdialog.h"

RotationDialog::RotationDialog(QWidget *parent) :
    QDialog(parent),
    ui(new Ui::RotationDialog)
{
    oldValue = 0;
    ui->setupUi(this);

//    connect(ui->degreeDial, SIGNAL(valueChanged(int)),
//            this, SIGNAL(degreeChanged(int)));
}

RotationDialog::~RotationDialog()
{
    delete ui;
}

void RotationDialog::on_degreeSpinBox_valueChanged(int value)
{
    if (  oldValue == 0 || value != oldValue )
    {
        emit degreeChanged( value - oldValue );
        oldValue = value;
    }
}
